unit UDao;

interface
  uses DB, UDM,SysUtils,Classes, IBCustomDataSet, IBDatabase,USingleton;

  type DAO = class

  private
  protected
      umdm : TDM;
  public
    constructor Create;
    destructor Destroy;
    function salvar (obj: Tobject) : string;      virtual;
    function editar (obj: Tobject) : string;      virtual;
    function GetDS : TdataSource;                 virtual;
    function Carrega(obj:Tobject) : Tobject;      virtual;
    function Buscar (chave : string) : boolean;   virtual;
    function Excluir (obj:Tobject) : string;      virtual;
    function existe(dado:string):Boolean;         virtual;
end;

implementation


{ dao }

function dao.Buscar(chave: string): boolean;
begin

end;


function dao.Carrega(obj: Tobject): Tobject;
begin

end;

constructor dao.Create;
begin
     umDM := USingleton.getInstance; //TDm.Create(nil);

end;

destructor dao.Destroy;
begin
   umdm.freeInstance;
end;

function DAO.editar(obj: Tobject): string;
begin

end;

function DAO.Excluir(obj: Tobject): string;
begin

end;

function DAO.existe(dado: string): Boolean;
begin

end;

function dao.GetDS: TdataSource;
begin

end;


function dao.salvar(obj: Tobject): string;
begin

end;

end.





